package com.netease.nim.uikit.business.session;

import android.app.Activity;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;

import com.netease.nim.uikit.api.NimUIKit;
import com.netease.nim.uikit.api.model.session.SessionCustomization;
import com.netease.nim.uikit.business.session.actions.BaseAction;
import com.netease.nim.uikit.business.session.viewholder.MsgViewHolderFile;
import com.netease.nim.uikit.business.session.viewholder.MsgViewHolderTip;
import com.netease.nim.uikit.impl.cache.TeamDataCache;
import com.netease.nimlib.sdk.msg.attachment.FileAttachment;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.netease.nimlib.sdk.team.constant.TeamTypeEnum;
import com.netease.nimlib.sdk.team.model.Team;

import java.util.ArrayList;

/**
 * Create by lizihao
 * Desc:
 * Date: 2018/9/29
 */
public class SessionHelper {
    public static void init(){
        registerViewHolders();
    }

    private static void registerViewHolders() {
        NimUIKit.registerMsgItemViewHolder(FileAttachment.class, MsgViewHolderFile.class);
        NimUIKit.registerTipMsgViewHolder(MsgViewHolderTip.class);
//        NimUIKit.setCommonTeamSessionCustomization(getTeamCustomization(null));
    }

    public static void startTeamSession(Context context, String tid) {
        startTeamSession(context, tid, null);
    }
    public static void startTeamSession(Context context, String tid, IMMessage anchor) {
        NimUIKit.startTeamSession(context, tid, null, anchor);
    }
    //
    public static void startTeamSession(Context context, String tid, Class<? extends Activity> backToClass, IMMessage anchor) {
        NimUIKit.startChatting(context, tid, SessionTypeEnum.Team, null, backToClass, anchor);
    }


}
